// Styles for special elements only used in one or two contexts

// MAIN LOG

#log {
	background: none;
}

#log ul, #log-latest ul {
	list-style-type: none;
	padding-left:0;
	margin: 0;
}

#log ul li, #log-latest ul li {
	margin: 0px 0px 0.8em 0px;
}

#log .msg { display: block; }

#log-overlay {
	height: 100%;
	width: 100%;
	position: inherit;
	pointer-events: none;
	top: 0;
}

#log ul li.log-loaded, #log ul li.log-loaded span {
	color: @color-text-dimmed;
}

span.time, span.msg-camp-level {
	.opacity-transition-reset();
	font-size: @font-size-tiny;
	vertical-align: middle;
}

span.msg-count, span.time, span.msg-camp-level {
	color: @color-text-secondary;
}

// MAIN HEADER (RESOURCE, STATS ETC)

#header-camp-container {
	display: flex;
}

.header-row {
	padding: 3px 5px;
}

.header-section {
	margin: 0px 5px 0px 0px;
	padding: 0px 2px;
}

#header-bag-storage, #bag-resources {
	display: inline-block;
}

#main-header-camp {
	width: 100%;
	display: flex;
}

#main-header-camp-overview {
	flex-basis: auto;
}

#main-header-camp-resources {
	flex-grow: 1;
}

#header-tribe-container {
	margin-bottom: 5px;
    padding-left: 5px;
}

#grid-switch-content {
	z-index: 1;
	position: relative;
}

#statsbar-resources-camp {
	width: 100%;
	display: flex;
    flex-wrap: wrap;
    justify-content: end;
    gap: 5px;
}

#statsbar-resources-mobile {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
	padding-left: 5px;
	padding-right: 5px;
}

#statsbar-resources-mobile .stat-indicator {
	width: 5em;
}

#statsbar-tribe-stats-regular, #bag-resources-regular {
	display: inline-block;
}

// "HEADER" SELF-BAR

#statsbar-self .stat-indicator {
	display: inline-block;
}

#header-self-bar {
	text-align: center;
	padding: 5px 3px;
	font-size: @font-size-small;
	border-width: 2px;
	background: @color-bg-box-1;
}

#header-self-bar ul {
	margin-top: 10px;
}

#header-self-bar > span, #header-size .stat-indicator span {
	display: block;
}

#header-self-bar .stat-indicator {
	margin: 1px 0px;
	width: 100%;
	max-width: @header-side-width - 5;
	line-height: 1em;
}

#header-self-bar .callout-container {
	width: 100%;
}

#header-self-bar .stat-indicator .value {
	font-size: @font-size-tiny;
	margin: 3px 0;
}

#header-self-bar .change-indicator {
	vertical-align: top;
	margin: 0.2em 0 0 0.25em;
}

#header-self-bar div.callout-arrow-up {
	margin: 0 0 0 (@header-side-width/2 - @callout-arrow-size);
}

.stat-indicator-secondary {
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: center;
}

.stat-indicator-secondary img {
	width: 1.75em;
	height: 1.75em;
}

.stat-indicator-secondary .value {
	min-width: 2em;
	font-size: 100%;
	margin: 0;
}

#container-equipment-stats-side {
	line-height: 1em;
}

#container-equipment-stats-mobile div {
	display: inline-block;
}

// LOCATION HEADER

#grid-location-header {
	padding: 10px 0px 0px 0px;
}

#grid-location-header h1, #grid-location-header img {
	display: inline-block;
	vertical-align: middle;
}

#level-icon {
	margin: 3px 3px 3px 0;
	width: 2.5em;
	height: 2.5em;
}

// MOBILE HEADER

#mobile-header {
    background: @color-bg-box-1;
    border-bottom: 5px solid @color-bg-page;
}

#mobile-header img.stat-icon {
	height: 1em;
	width: 1em;
}

.mobile-header-section {
	display: flex;
    justify-content: center;
	padding: 3px;
	flex-wrap: wrap;
}

#mobile-header-notification-container {
	width: 100%;
	min-height: 1em;
}

#mobile-header .stat-indicator {
	text-align: center;
}

#mobile-header .stat-indicator-with-fill {
	max-width: 5em;
}

// BAG SCREEN

.item-bag-options {
	margin-top: 5px;
}

#bag-resources > .callout-container {
	max-width: 49%;
}

// PLAYER NOTIFICATION (BUSY INDICATOR)

.notification-player {
	padding: 0px;
	border-width: 2px;
	border-style: solid;
	border-color: @color-border-strong;
    font-size: @font-size-small;
    display: none;
    margin-top: 5px;
}

.notification-player .progress {
	width: 100%;
	max-width: 100%;
	margin: 0;
	height: 1.25em;
}

// FOOTER

#footer {
	padding: 1px 5px 1px  @header-side-space;
	display: flex;
    align-items: center;
    height: 100%;
    gap: 5px;
 }

ul#game-options, ul#game-options-extended {
	list-style-type: none;
	padding: 0;
	margin: 0 0 0 0px;
	line-height: 1em;
	display: table;
	float: right;
}

ul#game-options li, ul#game-options-extended li {
	list-style-type: none;
	display: table-cell;
	vertical-align: middle;
}

#game-version, #game-msg {
	display: inline-block;
	text-transform: lowercase;
}

#game-msg {
    flex-grow: 1;
}

.sticky-footer .one-quarter {
	height: 2px;
	padding: 0px;
}

// CAMP buildings

span.improvement-badge {
	padding: 3px;
	margin: 1px;
	background-color: @color-bg-box-1;
	border: 1px solid @color-border-box-1;
	border-radius: 5px;
	min-width: 1em;
	display: inline-block;
	vertical-align: middle;
	text-align: center;
}

span.improvement-badge.badge-disabled {
	color: @color-text-disabled;
}

span.improvement-count {
	font-weight: bold;
}

span.improvement-badge.improvement-upgrade-level {
	position: absolute;
	background-color: @color-bg-element-1;
	top: -1px;
	right: -1px;
	padding: 0 1px !important;
	font-size: @font-size-tiny;
	width: 1em;
}

// camp population and workers

#in-population-status span {
	display: inline-block;
}

#in-population-details > div {
	width: 100%;
}

#in-characters ul {
	padding: 0;
}

#in-characters li {
	display: inline-block;
}

// CHANGELOG

.changelog-type {
	padding: 2px 5px;
	border-width: 1px;
	border-style: solid;
	margin: 0px 5px 0px 0px;
	border-color: @color-border-box-1;
}

#changelog {
	font-size: @font-size-small;
	margin-left: 10px;
	margin-right: 10px;
}

#changelog ul {
	padding: 0 0 0 2em;
	margin: 0.25em 0 1em 0;
	list-style-type: none;
}

#changelog li {
	position: relative;
	line-height: 1.35em;
}

#changelog li:before{
	width: 7px;
	height: 7px;
	background: @color-bg-contrast;
	content: ".";
	position: absolute;
	left: -1em;
	top: 0.375em;
	display: inline-block;
	overflow: hidden;
}

// OUT MINIMAP AND MOVEMENT BUTTONS

#minimap-background-container {
	position: relative;
    height: 224px;
    width: 224px;
	border-width: 2px;
    margin: auto;
}

#minimap-background {
	opacity: 0.75;
}

#minimap-container {
	position: absolute;
	top: 12px;
	left: 12px;
}

#out-container-compass, #out-container-compass-actions {
	text-align: center;
	width: 224px;
}

#out-container-compass canvas, #out-container-compass-actions table {
	margin-left: auto;
	margin-right: auto;
}

#table-out-actions-movement {
	margin-top: 10px;
}

// MAIN MAP

#mainmap-container-container {
	.opacity-transition-reset();
}

#mainmap-container-ascii {
    display: block;
    padding: 5px;
    margin: 5px;
    font-family: monospace;
}

#mainmap-container-ascii textarea {
	width: 100%;
}

// OUTGOING CARAVANS TABLE AND LIST

#trade-caravans-outgoing-container tr {
	border-width: 3px;
	border-bottom-width: 0px;
	border-style: solid;
	border-color: transparent;
}

#trade-caravans-outgoing-container tr.selected {
	border-color: @color-bg-element-1;
}

.trade-caravans-outgoing-plan {
	border-width: 3px;
	border-top-width: 0px;
}

.row-detail-indicator {
	display: inline-block;
	width: 1.5em;
	height: 1.5em;
	text-align: center;
}

 .row-detail-indicator {
	color: @color-text-secondary;
}

#trade-caravans-outgoing-list {
	list-style: none;
	padding: 0;
	margin: 0;
}

.trade-caravan-outgoing-item span {
	padding-right: 5px;
}

#mainmap-ascii-legend {
	padding: 5px;
}

// INCOMING CARAVAN POPUP

#incoming-caravan-popup-multiplier {
	justify-content: flex-end;
	font-size: @font-size-small;
	margin-bottom: 1em;
}

// TRIBE OVERVIEW TABLE

.camp-overview-production, .camp-overview-stats {
	font-size: @font-size-small;
}

.camp-overview-name {
	max-width: 5em;
	white-space: nowrap;
}

.camp-overview-name .label {
	overflow-x: hidden;
	max-width: 5em;
}

.camp-overview-btn {
	text-align: center;
}

td.camp-overview-level {
	padding: 0 2px;
	width: 1em;
}

.camp-overview-level-container {
	border-radius: 1.75em;
	text-align: center;
	font-size: @font-size-small;
	margin: 2px auto;
	vertical-align: middle;
	font-weight: bold;
}

.lvl-container-camp-normal {
	width: 2em;
	height: 2em;
	line-height: 2em;
	background-color: @color-bg-element-3;
	border-color: @color-bg-element-3;
}

.lvl-container-camp-outpost {
	width: 1.5em;
	height: 1.5em;
	line-height: 1.5em;
	background-color: @color-bg-element-2;
	border-color: @color-bg-element-2;
}

tr.camp-overview-camp {
	border-style: solid;
	border-width: 1px;
}

.camp-overview-lvl14 {
	text-align: center;
	height: 1em;
}

#camp-overview hr {
	margin: 0;
	border: 1px solid @color-bg-element-2;
}

// RESULT LIST

#resultlist-inventorymanagement-found ul li, #resultlist-loststuff-lost ul li {
	border-width: 0px;
	padding-bottom: 5px;
}

#resultlist-inventorymanagement .inventorybox {
    margin: 3px auto;
}

.layout-regular #resultlist-inventorymanagement .inventorybox {
	max-width: 25vw;
}

.layout-mobile #resultlist-inventorymanagement .inventorybox {
	max-width: 90vw;
}

ul.resultlist li {
	margin: 0px 3px;
	background-color: transparent;
}

ul.resultlist-positive li:before {
	content: "+ ";
}

div#resultlist-static-inventory ul {
	padding: 0;
	margin: 5px 0;
}

// MAIN SWITCH (TAB BAR)

.layout-mobile #switch {
	padding: 0 !important;
}

// CONTENT GRID
	
div.grid-content {
	background: @color-bg-box-1;
	border: @border-width-box-1 solid @color-border-box-1;
}

// BLUPRINT PIECES

.blueprint:hover {
	border-width: 2px !important;
}

.blueprint-piece-box {
	width: 2em;
	height: 2em;
	display: inline-block;
	margin: 0px 3px;
	border-width: 2px;
	border-style: solid;
	vertical-align: middle;
}

.layout-small .blueprint-piece-box {
	width: 2em;
	height: 2em;
}

.blueprint-piece-box-found {
	background: @color-bg-element-2;
	border-color: @color-border-strong;
}

.blueprint-piece-box-missing {
	background: @color-bg-box-1;
	border: 2px solid @color-border-box-1;
}

.blueprint-piece-box img {
	margin: 0.4em;
	width: 1.2em;
	height: 1.2em;
}

.layout-small .blueprint-piece-box img {
	margin: 0.2em;
	width: 0.8em;
	height: 0.8em;
}

// CAMP EVENTS (AND PERKS)

.event-starting {
	animation: event-end 1.3s step-end infinite;
	animation-timing-function: ease-in-out;
}

.event-ending {
	animation: event-end 1.3s step-end infinite;
	animation-timing-function: ease-in-out;
}

.event-no-timer .progress-bar {
	opacity: 0.5 !important;
}

@keyframes event-end {
	0%	{opacity: inherit}
	50%	{opacity: 0.4}
}

// FIGHT POPUP

#fight-popup {
	min-width: 35%;
}

.fight-damage-indicator, .fight-status-indicator {
	margin: 0;
	font-size: @font-size-small;
	font-weight: bold;
	position: absolute;
	top: 0;
	.opacity-transition-reset();
}

.fight-damage-indicator {
	color: @color-border-warning;
	right: -3em;
}

.fight-status-indicator {
	color: @color-text-secondary;
	right: -5em;
}

.fight-status-stunned {
	color: @color-text-disabled;
}

#fight-popup-enemy-stats {
	.opacity-transition-reset();
}

#fight-popup-enemy-difficulty {
	.opacity-transition-reset();
}

// TRIBE LEVEL / MILESTONES

#milestone-next-unlocks {
	margin: 1em 0;
}

.unlocks-list-entry {
	display: block;
}

.reqs-list-entry {
	display: inline-block;
	margin: 0 5px 0 0;
}

.reqs-checkmark {
	background-image: @img-indicator-checkmark-default;
    background-repeat: no-repeat;
    background-image: url(../img/eldorado/icon-checkmark-dark.png);
    background-size: 1em 1em;
    background-position: center;
    display: inline-block;
    height: 1em;
    width: 1em;
}

// SAVE MANAGEMENT POPUP

#manage-save-popup {
	width: 42em;
	max-width: 90% !important;
}

#manage-save-popup textarea {
	font-size: @font-size-small;
	color: @color-text-secondary;
	overflow-x: hidden;
}

#save-list-container {
	padding: 3px;
    display: flex;
	gap: 5px;
	border: 1px solid @color-border-strong;
}

#save-list {
	flex: 0.65;
	display: flex;	
    flex-direction: column;
    gap: 3px;
}

#save-list-options {
	flex: 0.35;
	border: 1px solid @color-border-box-1;
}

#save-list-options.selected {	
	background-color: @color-bg-element-1;
}

#save-list-options {
	padding: 3px;
}

#save-list-options-empty {
    display: flex;
    height: 100%;
    align-content: center;
    justify-content: center;
    align-items: center;
    padding: 5px;
}

#manage-save-textarea {
	font-size: @font-size-small;
}

.li-save-slot {
	width: 100%;
	min-height: 1em;
	text-align: left;
	border: 1px solid @color-border-box-1;
}

.save-slot-header {
	padding: 3px 3px 0 3px;
}

.save-slot-content {
	padding: 0px 3px 3px 3px;
}

.save-slot-info {
    color: @color-text-secondary;
}

.li-save-slot.selected {
	background-color: @color-bg-element-1;
}

.li-save-slot div {
	margin: 0 3px;
}

.save-slot-date {
	float: right;
    color: @color-text-secondary;
}

// GAME STAT POPUP

#game-stats-container {
	max-height: 70vh;
    padding: 0 5px;
}

#game-stats-container td {
	text-align: left;
}

.game-stat-name {
    text-align: left;
}

.game-stat-category {
	text-align: left;
	text-transform: uppercase;
	padding-top: 1em;
}

.game-stat-highscore-value {
	color: @color-text-secondary;
}

.game-stat-highscore-entry {
	color: @color-text-secondary;
}

// SETTINGS POPUP

.settings-entry {
	display: block;
}

.hotkey-list-item {
    display: flex;
    gap: 5px;
}

.hotkey-list-item-label {
    min-width: 35%;
    text-align: left;
}

// MOBILE OVERLAY

#mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 20;
    width: 100%;
    height: 100%;
    background: @color-bg-page;
}

#mobile-overlay p, #mobile-overlay h2 {
	margin: 1em;
}
